import axios from 'axios'

// 测试发布域名
// export const base = 'http://developer.dlintech.com:8080';   // 修改当前的base路径，切换开发环境,只需修改此处

// 正式发布域名
export const base = 'http://admin.dlintech.com:8080';   // 修改当前的base路径，切换开发环境,只需修改此处

// 国栋本地
// let base = 'http://10.7.17.19:8083'

// 王英
// export let base = 'http://10.7.100.145:8083';

// 本地java服务
// export let base = 'http://localhost:8082/Gradle___bestAgent___bestAgent_1_0_SNAPSHOT_war__exploded_/';

// 图片开发环境
// export const uploadUrlCommon = 'http://10.7.100.104:8083'

// 图片测试环境
// export const uploadUrlCommon = 'http://developer.dlintech.com:8080'

// 图片生产环境
export const uploadUrlCommon = base || 'http://admin.dlintech.com:8080';


// 搜索buy/rent接口
export const searchBuyList = params => {
  return axios.get(`${base}/app/transaction/visitor`, {params})
}

// review列表接口
export const reviewList = params => {
  return axios.get(`${base}/admin/restaurant/review/query-list`, {params})
}

// review详情接口
export const reviewDetail = params => {
  return axios.get(`${base}/admin/restaurant/review/detail/${params}`)
}

// review编辑接口
export const reviewEdit = params => {
  return axios.post(`${base}/admin/restaurant/review/save`, params)
}

// booking列表接口
export const bookingList = params => {
  return axios.get(`${base}/admin/restaurant/booking`, {params})
}

// activities 列表接口
export const activityList = params => {
  return axios.get(`${base}/admin/restaurant-activity/query-list`, {params})
}

// 新增activity的接口
export const newActivity = (params) => {
  return axios.post(`${base}/admin/restaurant-activity/save`, params)
}

// bookRoute列表接口
export const busRouteList = params => {
  return axios.get(`${base}/admin/busRoute/query-list`, {params})
}

// bookRoute列表接口
export const busRouteUploadExcel = params => {
  return axios.post(`${base}/admin/busRoute/excel-upload`, {params})
}

// bookRoute  line查询接口
export const busRouteLineList = params => {
  return axios.get(`${base}/admin/busRoute/query-all-line?status=1`, {params})
}

// map lag接口
export const mapAll = params => {
  return axios.get(`${base}/admin/busRoute/query-all`, {params})
}

// bus sotp列表接口
export const busStopList = params => {
  return axios.get(`${base}/admin/busStop/query-list`, {params})
}

// train schedule列表接口
export const trainScheduleList = params => {
  return axios.get(`${base}/admin/train/schedule/query`, {params})
}

// train schedule 查询下拉框接口
// export const trainQuerySelectList = (params) => {
//   return axios.get(`${base}/admin/train/schedule/querySelectList`, {params})
// }

// 新的下拉框接口3

export const trainScheduleRoute = (params) => {
  return axios.get(`${base}/admin/train/schedule/queryRoute`)
}

export const trainScheduleSchedule = (params) => {
  return axios.get(`${base}/admin/train/schedule/querySchedule`, {params})
}

export const trainScheduleStation = (params) => {
  return axios.get(`${base}/admin/train/schedule/queryStation`, {params})
}


// train  route列表接口
export const trainRouteQuery = params => {
  return axios.get(`${base}/admin/train/route/query`, {params})
}

// Route schedule  下拉菜单数据查询

export const trainRouteScheduleQueryJson = params => {
  // return axios.get(`${base}/admin/train/routeSchedule/queryRoute`, {params})
  return axios.get(`${base}/admin/train/schedule/queryRoute`)
}

// Route schedule  列表数据查询

export const trainRouteScheduleQueryList = params => {
  return axios.get(`${base}/admin/train/routeSchedule/query`, {params})
}
// 上传电脑用户信息
export const getFixedUser = params => {
  return axios.get(`${base}/admin/shop/ads/fixed_user`, {params})
}

// computer model 列表请求
export const getComputerModel = params => {
  return axios.get(`${base}/admin/shop/computer/query`, {params})
}

// computer model 新增接口
export const saveComputerModel = params => {
  return axios.post(`${base}/admin/shop/computer/save`, params)
}

// computer model 详情接口
export const getComputerModelDetail = params => {
  return axios.get(`${base}/admin/shop/computer/detail`, {params})
}

// computer model 编辑接口
export const EditComputerModel = params => {
  return axios.post(`${base}/admin/shop/computer/edit`, params)
}


// computer model 图片上传
export const saveComputerModelPhoto = params => {
  return axios.post(`${base}/admin/shop/computer/image_upload`, params)
}

//get car brand model data
export const getCarModelData = (params) => {
  return axios.get(`${base}/admin/shop/car_model/select-by-brand-property-id/${params}`)
}
